<include file="Public/header" /> 

<!--主窗体-->
<div class="container app">
	<!--左侧菜单-->
	<include file="Public/sidebar" /> 
	<!--左侧菜单//-->
	
	<!-- mainCon -->
	<div id="mainCon" class="mainCon">
		<h4>会员等级列表</h4>
		<div class="bk10"></div>
		<table class="table table-bordered table-hover">
			<tr>
				<th>编号</th>
				<th>等级名称</th>
				<th>价格(元)</th>
				<th>有效期(月)</th>
				<th>等级详细描述</th>
				<th>操作</th>
			</tr>
			
			<empty name="level_list">
				<tr><td colspan="9" style="text-align:center;color:#999">～暂无数据～</td></tr>
			<else /> 
			
				<foreach name="level_list" item="vo">
					<tr>
						<td><{$vo['level_id']}></td>
						<td><{$vo['level_name']}></td>
						<td><{$vo['price']}></td>
						<td><{$vo['valid_time']}></td>
						<td><{$vo['note']}></td>
						<td>
							<a href="<{:U('Admin/Option/levelEdit',array('level_id'=>$vo['level_id'],'k'=>6,'sk'=>16))}>">编辑</a>
						</td>
					</tr>
				</foreach>
			
			</empty> 
			
			
		</table>
		
		<div class="pagebar">
			<{$pager}>
		</div>
		
	</div>
	<!-- mainCon// -->
	
</div>
<!--主窗体//-->

<script src="__PUBLIC__/js/layer/layer.js"></script>
<script>

$(function(){
	$(".userLock").click(function(){
		var disable = $(this).attr("data-disable");
		var uid = $(this).attr("data-id");
		if(disable == 0){
			var msg = "您是否确定锁定该会员？锁定后该会员将无法登录。";	
		}else{
			var msg = "您是否确定启用该会员？启用后该会员可以正常使用。";	
		}
		layer.confirm(msg, {icon: 3, title:'提示'}, function(index){
			$.post("<{:U('Admin/User/memberLock')}>",{"disable":disable,"uid":uid},function(r){
				if(r.error == 1){
					layer.close(index);
					layer.alert(r.errmsg,{icon: 2});
				}else{
					window.location.reload();
				}
			});
		});
		return false;
	});
});
</script>

<include file="Public/footer" /> 